<!DOCTYPE html>
<html xml:th="http://www.thymeleaf.org" lang="zh-cmn-Hans">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" th:href="@{/webjars/bootstrap/5.1.3/css/bootstrap.min.css}"/>
    <script type="text/javascript" th:src="@{/webjars/bootstrap/5.1.3/js/bootstrap.bundle.js}"></script>
    <title>国际化的Hello</title>
</head>
<body>
<div class="container">
    <label th:text="#{hello.message}">国际化消息</label>
    <label th:text="${helloMessage}">国际化消息</label>
    <div class="alert alert-primary" th:text="${hello}"></div>
    <div class="dropdown">
        <button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenuButton" data-bs-toggle="dropdown"
                th:text="#{choose}">
            选择语言
        </button>
        <div class="dropdown-menu">
            <a class="dropdown-item" th:href="@{/i18n/hello?location=en_US}" th:text="#{en}">英文</a>
            <a class="dropdown-item" th:href="@{/i18n/hello?location=zh_CN}" th:text="#{cn}">中文</a>
        </div>
    </div>
</div>
</body>
</html>